@mixin box-clamp($lines: 1, $substract: 0) {
  @if $lines == 1 {
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100% - $substract;
    overflow: hidden;
  } @else {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: $lines;
    line-clamp: $lines;
    -webkit-box-orient: vertical;
    box-orient: vertical;
  }
}

@for $i from 1 through 3 {
  .us-ellipsis#{$i} {
    @include box-clamp($i);
  }
}
